package com.ohos.connent.bizscenecloud.biz.modular.dp.enums;

import lombok.Getter;
import org.apache.commons.lang3.StringUtils;

/**
 * 审核枚举类
 */
@Getter
public enum ExamineEnum {
    /**
     * 提交审核
     */
    SUBMIT("0","提交审核"),
    /**
     * 审核通过
     */
    APPROVED("1","审核通过"),
    /**
     * 审核驳回
     */
    OVERRULE("2","审核驳回"),

    /**
     * 撤回审核
     */
    WITHDRAW("3","撤回审核");

    private final String key;

    private final String value;

    ExamineEnum(String key,String value) {
        this.key = key;
        this.value = value;
    }

    public static ExamineEnum getByKey(String key) {
        if (StringUtils.isEmpty(key)) {
            return null;
        }
        for (ExamineEnum examineEnum : ExamineEnum.values()) {
            if (StringUtils.equals(examineEnum.key,key)) {
                return examineEnum;
            }
        }
        return null;
    }


}
